<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>字体样式</title>
    <style>
        .c1{
            font-size: 20px;
        }
        .c2{
            /*
                1em = 父元素字体大小
                2em = 2 * 20 = 40px
            */
            font-size: 2em;
        }
        .c3{
            /*
                1rem = 根元素字体大小,根元素html默认16px
                2rem = 2 * 16 = 32px
            */
            font-size: 2rem;
        }
        .c4{
            font-size: 32px;
        }
        /*指定根元素字体大小*/
        html{
            font-size: 20px;
        }
        .c5{
            font-weight: bolder;
            font-style: italic;
            font-family: '宋体';
        }
        .c6{
            font-weight: 400;
            font-style: normal;
            font-family: '楷体';
        }
        .c7{
            font: italic bold 1em '宋体';
        }
    </style>
</head>
<body>
<div class="c1">这是c1</div>
<div class="c1">
    <div class="c2">这是c1中的c2</div>
    <div class="c3">这是c1中的c3</div>
</div>
<div class="c4">这是c4</div>
<div class="c5">这是c5</div>
<div class="c6">这是c6</div>
<div class="c7">简写属性</div>
</body>
</html>